{extend name="public:base"/}

{block name="body"}

    {extendtag:advs var="banners" flag="banner"/}
    <div id="carouselBannerControls" class="carousel slide" data-ride="carousel">
        <ol class="carousel-indicators">
            {volist name="banners" id="item" key="k"}
                <li data-target="#carouselBannerControls" {$k==1?'class="active"':''} data-slide-to="{$k-1}"></li>
            {/volist}
        </ol>
        <div class="carousel-inner">
            {volist name="banners" id="item" key="k"}
                <div class="carousel-item{$k==1?' active':''}" style="background-image:url({$item.image})">
                    <img src="{$item.image}" alt="{$image.title}">
                    <p>{$item.title}</p>
                </div>
            {/volist}
        </div>
        <a class="carousel-control-prev" href="#carouselBannerControls" role="button" data-slide="prev">
            <span class="carousel-control-prev-icon" aria-hidden="true"></span>
            <span class="sr-only">Previous</span>
        </a>
        <a class="carousel-control-next" href="#carouselBannerControls" role="button" data-slide="next">
            <span class="carousel-control-next-icon" aria-hidden="true"></span>
            <span class="sr-only">Next</span>
        </a>
    </div>
<div class="container index-body">
    <div class="row">
        <div class="col-lg-9">
            <ul class="list-group article-list">
                {article:list var="articles" order="create_time DESC" category="infomation" recursive="true" /}
                {volist name="articles" id="art"}
                <li class="list-group-item">
                    {if !empty($art['cover'])}
                    <a class="list-img" href="{:viewurl($art)}" style="background-image:url({$art.cover})">
                        <img class="card-img-top" src="{$art.cover|media=normal}" alt="Card image cap">
                    </a>
                    {/if}
                    <div class="art-view">
                        <h3><a href="{:viewurl($art)}">{$art.title}</a></h3>
                        <div class="desc">
                            {$art.description}
                        </div>
                        <div class="text-muted">
                            <a href="{:listurl($art['category_name'], $art['channel_name'])}"><span  class="badge badge-secondary">{$art.category_title}</span></a>
                            <span class="ml-2"><i class="ion-md-time"></i> {$art.create_time|showdate}</span>
                            <span class="ml-2"><i class="ion-md-paper-plane"></i> {$art.views}</span>
                            <span class="ml-2" data-anchor="comment"><i class="ion-md-text"></i> {$art.comment}</span>
                        </div>
                    </div>
                </li>
                {/volist}
            </ul>
            <div class="clear-fix">
                <a class="link-btn float-right" href="{:listurl('blog')}">More &RightArrow;</a>
            </div>
        </div>
        <div class="col-lg-3 sidecolumn">
            <div class="card">
                <div class="card-header">支持一下</div>
                <div class="card-body text-center">
                    <img style="max-width: 100%" src="__STATIC__/images/qrcode.jpg"/>
                </div>
            </div>
            <div class="card">
                <div class="card-header">推荐阅读</div>
                <div class="card-body">
                    {article:list var="articles" order="views DESC" /}
                    <div class="list-side">
                    {volist name="articles" id="art"}
                        <a href="{:viewurl($art)}">{$art.title}</a>
                    {/volist}
                    </div>
                </div>
            </div>
            <div class="card text-center">
                {extendtag:advs var="advs" flag="rightad" /}
                {volist name="advs" id="ad"}
                    <a href="{$ad.url}" target="_blank" ref="no_follow"><img src="{$ad.image}" title="{$ad.title}"/></a>
                {/volist}
            </div>
        </div>
    </div>
    <div class="row mt-5">
        <div class="col">
            <span class="text-muted">友情链接：</span>
            {extendtag:links var="links" /}
            {volist name="links" id="link"}
                <a href="{$link.url}" target="_blank" >{$link.title}</a>
            {/volist}
        </div>
    </div>
</div>
{/block}
{block name="script"}
    <script type="text/javascript">

    </script>
{/block}
